sorted_array
container.sorted_array
sorted_array(T:Any,from Sequence T,less_than_or_equal Binary bool T T):array T is[Module base]¶[src]
Type Parameters
Functions
execute(env_vars option (container.Map String String),feed_stdin option io.path,timeout option time.duration) => outcome tokiwa.process_result[Inherited from Sequence]¶[src]
execute this Sequence of process+args
0.099dev (GIT hash e2d5298d8107bb5fe79600fdb06a49bc75756344)
This takes an unsorted array and a compare function as an arguments and
returns a sorted one.
Non-mutating heap sort is used internally. This gives guaranteed performance in
O(n log n) comparisons and assignments for an array of size n.
This is a little wasteful on allocated memory, which is also O(n log n) since
partially sorted arrays are thrown away. This might be improved to use an
in-place heap sort to bring allocated memory down to O(n).